import React, { Component } from 'react'
import { HashRouter as Router, Route } from 'react-router-dom'
class Index extends Component {
  render() {
    return <div>223</div>
  }
}
class User extends Component {
  render() {
    return <div>233333333</div>
  }
}
class Manager extends Component {
  render() {
    return <div>7798789798788789798</div>
  }
}
export default class Private extends Component {
  state = {
    admin: false
  }
  render() {
    return (
      <div>
        <Router>
          {
            this.state.admin ? (<div><Route path='/index' exact component={Index}></Route>
              <Route path='/user' exact component={User}></Route>
              <Route path='/manager' exact component={Manager}></Route>
            </div>):(<Route path='/index' exact component={Index}></Route>)
          }
        </Router>
      </div>
    )
  }
}
